<!--活动筛选-->
<template>
  <view class="container">
    <view class="header">
      <view class="search">
        <img
          class="search-img"
          src="http://ltcx-img.oss-cn-beijing.aliyuncs.com/miniprogram/common/graySearch.png"
        />
        <input
          value=""
          placeholder="搜索城市"
          class="search-input"
          placeholder-class="search-input-placeHolder"
        />
      </view>
      <view class="tab">
        <view
          class="item"
          v-for="(item, index) in tabs"
          :key="index"
          :data-item="item"
          @tap="handleTab"
        >
          <p :class="currTab == item && 'color-333'">{{ item }}</p>
          <view class="indicator" v-if="currTab == item" />
        </view>
      </view>
    </view>

    <block v-if="currTab == '国内'">
      <view class="tab-item" v-if="currTab == '国内'">
        <p class="title">定位/附近城市</p>
        <view class="city-list">
          <view
            :class="[
              'city-item',
              'flex-row-align-center',
              currCity.cityid == cityData.recentlyCity.cityid &&
              cityType == 'recently'
                ? 'active'
                : 'inactive',
            ]"
            @tap="handleCity"
            :data-item="cityData.recentlyCity"
            data-type="recently"
          >
            <image
              class="location-img"
              src="https://ltcx-img.oss-cn-beijing.aliyuncs.com/miniprogram/common/cityLocation.png"
            />
            <p>{{ cityData.recentlyCity.nameObj.name }}</p>
          </view>
        </view>
        <p class="title">一级站点</p>
        <view class="city-list">
          <view
            :class="[
              'city-item',
              'flex-row-align-center',
              currCity.cityid == item.cityid && cityType == 'first'
                ? 'active'
                : 'inactive',
            ]"
            v-for="(item, index) in cityData.firstClassCity"
            :key="index"
            @tap="handleCity"
            :data-item="item"
            data-type="first"
          >
            <p>{{ item.nameObj.name }}</p>
          </view>
        </view>
        <p class="title">二级站点</p>
        <view class="city-list">
          <view
            :class="[
              'city-item',
              'flex-row-align-center',
              currCity.cityid == item.cityid && cityType == 'second'
                ? 'active'
                : 'inactive',
            ]"
            v-for="(item, index) in cityData.secondaryCities"
            :key="index"
            @tap="handleCity"
            :data-item="item"
            data-type="second"
          >
            <p>{{ item.nameObj.name }}</p>
          </view>
        </view>
      </view>
    </block>
    <block v-if="currTab == '国外'">
      <view class="abroad">
        <image src="https://ltcx-img.oss-cn-beijing.aliyuncs.com/miniprogram/common/emptyPage.png"/>
        <p class="font-size-24 color-999">正在开发中，敬请期待</p>
      </view>
    </block>
    <custom-commonFooter @handleTap="handleTap" />
  </view>
</template>

<script src="./indexMod.js">
</script>
<style src="./indexStyle.scss" lang="scss" scoped>
</style>